1. Technical Field
The present invention relates to a control device, control method, and storage medium storing a program that controls a device such as a printer.
2. Related Art
Component-based programs and software (“objects” below) written in object-oriented programming languages are known from the literature. Objects are reusable software constructions that operate under a particular operating system. A wide variety of systems have been developed using objects. Operating systems (OS) built on the .NET Framework provided by Microsoft® provide an environment in which client application programs (container applications) can use objects, and have a wide range of functions enabling objects to be used.
One example of a system that uses objects is a POS (point-of-sale) system. A POS system is a system constructed with a variety of different peripheral devices, and typically has a display, printer, and input devices such as a scanner, cash drawer, and card reader, connected to a personal computer or other host computer. See, for example, Japanese Unexamined Patent Appl. Pub. JP-A-H09-106355. JP-A-H09-106355 describes a personal computer-based POS system constructed using objects.
A distributed object POS system includes a POS application program and objects for peripherals (devices) such as printers, scanners, and cash drawers provided by different manufacturers. A device object includes a control object provided for a specific type of device (device class), and a service object provided for a particular device. For example, when the POS application program outputs data to a printer, the data is passed to the control object (CO) for the printer, passed to the service object (SO) corresponding to the manufacturer and model of the output printer, and the data is passed to the printer through the input/output interface of the OS.
Detailed specifications are defined for each peripheral device class, and a control object is constructed according to a particular specification such as the OPOS (OLE for Retail POS) standard, for example, but the service object is developed according to the specifications defined by the manufacturer for individual devices.
A detailed standard is thus defined for each peripheral device class, and the control object is constructed according to a particular standard such as the OPOS standard. Service objects, however, are developed for a specific device by the manufacturer according to the specifications of the device. As a result, when the specifications of a device such as a printer are changed, and when a new model is developed, a service object must be developed for the modified or new device. However, as devices gain more functions, the control object must call more methods, and developing a new service object to be compatible with all methods requires significant effort.
A first object of the present invention is therefore to reduce the effort required to develop device objects such as service objects for use in a device control program.
In addition, output devices such as printers connected to a host computer store data for plural font patterns (font data) for compatibility with the character codes outputs from the host computer. Such output devices store a character code set, which is a single unit of a specific number of character codes for a specific language, for each language the output device can handle. The printer is told whether the character code set for German, Italian, or other language, for example, is to be used by a command from the host computer or a configuration switch on the printer. When data (character code) specifying a particular character in the specified character code set is input from the host computer, the corresponding font pattern data is read from memory and the character is recorded on the recording medium by driving a recording head, for example.
Modern host computer operating systems may also use a universal character code set. A universal character code set such as Unicode contains character codes for plural languages in a single unified character code system (a single character code set). Universal character code sets are increasingly common because the characters that an application program can use are not limited to any particular language if the operating system also uses the universal character code set. Japanese Unexamined Patent Appl. Pub. JP-A-2011-8661, for example, describes a method whereby the host computer, for example, uses a map file to map the character codes of the universal character code set character by character to the font pattern data built into the output device in order to make an output device that has plural character code sets built in compatible with a universal character code set.
Some output devices, however, only have font pattern data for the character code sets of some languages in the universal character code set. The host computer must therefore convert character codes using a device driver or other program in order to control such output devices. More specifically, the character codes of the specific character code set (such as Unicode) that are output by the application program run by the host computer must be converted to character codes in the character code set that the output device can understand. This conversion process is typically performed by the device driver. However, the language used by the device driver and the language used by the output device must be the same in order for the device driver to execute the conversion process. The conversion process may therefore not be executed normally depending upon the languages of the device driver and output device. Managing the language compatibility of the device driver and output devices is also complicated.
A second object of the present invention is therefore to enable the output device to correctly output the data output by the application program, and to simplify managing output devices and the means of controlling output devices.